package com.gdk.service.impl;

import java.util.Comparator;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.function.Function;
import java.util.stream.Collectors;
import java.util.stream.IntStream;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.gdk.dao.ArticleDao;
import com.gdk.dao.CategoryDao;
import com.gdk.dao.GoodsDao;
import com.gdk.dao.LoginDao;
import com.gdk.dao.NavigationDao;
import com.gdk.dao.UserDao;
import com.gdk.service.ArticleService;
import com.gdk.service.CategoryService;
import com.gdk.service.GoodsService;
import com.gdk.service.LoginService;
import com.gdk.service.NavigationService;
import com.gdk.service.UserService;
import com.gdk.utils.Md5Utils;
import com.gdk.utils.XVDateUtils;
import com.google.gson.Gson;


/**
 * 用户业务处理
 * */
@Service("UserService")
public class UserServiceImpl implements UserService {
	@Autowired
    private UserDao userDao;

	 @Override
	public List<Map<String, Object>> selectAllUser(Map<String,Object> map) {
		return userDao.selectAllUser(map);
	}
	
	@Override
	public Map<String, Object> selectUserDetails(Map<String, Object> map) {
		Map<String,Object> goodsDetails = userDao.selectUserDetails(map);
	
		return goodsDetails;
	}
	@Override
	public int updateUserDetails(Map<String, Object> map) {
		return userDao.updateUserDetails(map);
	}

	@Override
	public List<Map<String, Object>> selectCommissionByUser(Map<String, Object> map) {
		return userDao.selectCommissionByUser(map);
	}
	@Override
	public List<Map<String, Object>> selectIntegralByUser(Map<String, Object> map) {
		return userDao.selectIntegralByUser(map);
	}
	@Override
	public int addCommissionByUser(Map<String, Object> map) {
		return userDao.addCommissionByUser(map);
	}
	@Override
	public int addsIntegralByUser(Map<String, Object> map) {
		return userDao.addsIntegralByUser(map);
	}
	@Override
	public List<Map<String, Object>> selectIntegralByOrder(Map<String, Object> map) {
		return userDao.selectIntegralByOrder(map);
	}
	@Override
	public List<Map<String, Object>> selectAllUserByRy(Map<String, Object> map) {
		return userDao.selectAllUserByRy(map);
	}
	@Override
	public List<Map<String, Object>> selectAllApplyTX(Map<String, Object> map) {
		return userDao.selectAllApplyTX(map);
	}
	@Override
	public int updateUserOrderMoneyDetails(Map<String, Object> map) {
		return userDao.updateUserOrderMoneyDetails(map);
	}
	@Override
	public List<Map<String, Object>> selectAllUserCommissionApplyTX(Map<String, Object> map) {
		return userDao.selectAllUserCommissionApplyTX(map);
	}
	@Override
	public int updateUserCommissionDetails(Map<String, Object> map) {
		return userDao.updateUserCommissionDetails(map);
	}
	@Override
	public int addUser(Map<String, Object> map) {
		return userDao.addUser(map);
	}
	@Override
	public List<Map<String, Object>> selectUserDetailsByPhone(Map<String, Object> map) {
		return userDao.selectUserDetailsByPhone(map);
	}
	@Override
	public int delUser(Map<String, Object> map) {
		return userDao.delUser(map);
	}
	
	
	@Override
	public int truncateUser(Map<String, Object> map) {
		return userDao.truncateUser(map);
	}
}
